<%@ page import="hp.com.entity.Users" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<%
    String path = request.getContextPath();
    request.setAttribute("path",path);
    request.setAttribute("pageNo",request.getParameter("pageNo"));
    Users userSession =(Users) request.getSession().getAttribute("userSession");
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link type="text/css" rel="stylesheet" href="${path}/jbs/css/style.css" />
    <script type="text/javascript" src="${path}/jbs/js/jquery-1.11.1.min_044d0927.js"></script>
	<script type="text/javascript" src="${path}/jbs/js/jquery.bxslider_e88acd1b.js"></script>

    <script type="text/javascript" src="${path}/jbs/js/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="${path}/jbs/js/menu.js"></script>

	<script type="text/javascript" src="${path}/jbs/js/lrscroll_1.js"></script>


	<script type="text/javascript" src="${path}/jbs/js/n_nav.js"></script>

    <script type="text/javascript" src="${path}/jbs/js/s_ban.js"></script>
    <link rel="icon" href="<%=path%>/jbs/images/ico.ico" type="image/x-icon">
<title>产品列表-青鸟优选</title>
</head>
<body style="background-color: #f9f9f9">
<!--Begin Header Begin-->
<div class="soubg">
    <div class="sou">
        <span class="fr">
        	<span class="fl">
                <c:choose>
                    <c:when test="${userSession==null}">
                        <a href="${path}/jbs/Regist.jsp" style="color:#02A4F8;">免费注册</a>&nbsp;|&nbsp;
                         <a href="${path}/jbs/Login.jsp" style="color:#02A4F8;">马上登录</a>
                    </c:when>
                    <c:otherwise>
                        <%=userSession.getLoginname()%> |&nbsp;<a href="${path}/User">个人中心</a> | <a href="${path}/Orders">我的订单</a> |
                    </c:otherwise>
                </c:choose>&nbsp;
            </span>
        </span>
    </div>
</div>
<div class="top">
    <div class="logo"><a href="<%=path%>/Index"><img src="${path}/jbs/images/logo.png" /></a></div>
    <div class="search">
    	<form>
        	<input type="text" value="" class="s_ipt" />
            <input type="submit" value="搜索" class="s_btn" />
        </form>
    </div>
    <div class="i_car">
        <a href="${path}/Cart"><div class="car_t">购物车</div></a>
    </div>
</div>
<!--End Header End-->
<!--Begin Menu Begin-->
<div class="menu_bg">
	<div class="menu">
    	<!--Begin 商品分类详情 Begin-->
        <!--End 商品分类详情 End-->
    	<ul class="menu_r">
            <style>
                #home:hover{
                    animation:none!important;
                }
            </style>
        	<li ><a href="${path}/AllProducts?pageNo=1" id="home" style="background-color: #02A4d9;color: white">全部</a></li>
            <li><a href="${path}/Types?category=14&pageNo=1">学习</a></li>
            <li><a href="${path}/Types?category=1&pageNo=1">食品</a></li>
            <li><a href="${path}/Types?category=2&pageNo=1">化妆品</a></li>
            <li><a href="${path}/Types?category=3&pageNo=1">服装</a></li>
            <li><a href="${path}/Types?category=4&pageNo=1">家居</a></li>
            <li><a href="${path}/Types?category=5&pageNo=1">数码产品</a></li>
        </ul>
    </div>
</div>
<!--End Menu End-->
<div class="i_bg">
	<!--Begin Banner Begin-->
    <script type="text/javascript">
    //var jq = jQuery.noConflict();
    (function(){
        $(".bxslider").bxSlider({
            auto:true,
            prevSelector:jq(".top_slide_wrap .op_prev")[0],nextSelector:jq(".top_slide_wrap .op_next")[0]
        });
    })();
    </script>
    <!--End Banner End-->

    <div class="content mar_10">
    	<!--Begin 特卖 Begin-->
    	<div class="s_left">
            <c:if test="${pageNo==1||pageNo==null}">
        	<div class="brand_t">品牌特卖</div>
        	<ul class="sell_brand">
            	<li>
                	<div class="con">
                    	<div class="simg"><img src="${path}/jbs/images/sb1.jpg" width="220" height="100" /></div>
                        <div class="ch_bg">
                        	<span class="ch_txt">先领券再消费</span>
                            <a href="#" class="ch_a">查看</a>
                        </div>
                        09月12日 — 10月20日
                    </div>
                    <div class="img"><img src="${path}/jbs/images/tm1.jpg" width="530" height="190" /></div>
                </li>
            </ul></c:if>
            <div class="brand_t">商品信息</div>
            <ul class="p_sell">
                <c:forEach items="${page.pageList}" var="list">
                  	<li>
                	<div class="img"><a href="<%=path%>/details?id=${list.id}"><img src="${list.picName}" width="160" height="140" /></a></div>
                        <a href="<%=path%>/details?id=${list.id}"><div class="name">${list.easyName}</div>
                    <div class="price">
                        ${list.description}
                    </div></a>
                    <div class="ch_bg">
                        <span class="ch_txt">￥<font>${list.sukPrice}</font></span>
                        <a href="<%=path%>/details?id=${list.id}" class="ch_a">查看</a>
                    </div>
                </li>
                </c:forEach>
            </ul>
            <p align="center" class="pageNav">

                <c:if test="${pageNo!=1&&pageNo!=null}">
                    <a href="${path}/AllProducts?pageNo=1" id="firstPageBtn" >首页</a>
                    <a href="${path}/AllProducts?pageNo=${page.pageNo -1 <=1? 1:page.pageNo -1}">上一页</a>
                    </c:if>
                <c:forEach  begin="1" end="${page.pageNum}" varStatus="i">
                    <c:if test="${i.index==page.pageNo}">
                        <style>
                            #pageId_${i.index}:hover{
                                animation: none !important;
                            }
                        </style>
                    </c:if>

                    <a id="pageId_${i.index}" href="${path}/AllProducts?pageNo=${i.index}" <c:if test="${i.index==page.pageNo}">style="background-color: #02A4d9;color: white"</c:if> >${i.index}</a>
                </c:forEach>
                <c:if test="${pageNo!=page.pageNum}">
                    <a href="${path}/AllProducts?pageNo=${page.pageNo +1 >=page.pageNum?page.pageNum:page.pageNo +1}">下一页</a>
                    <a href="${path}/AllProducts?pageNo=${page.pageNum}">末页</a>
                </c:if>

            </p>
        </div>
   		<!--End 特卖 End-->

    </div>



    <!--Begin Footer Begin -->
    <div class="b_btm_bg bg_color">
        <div class="b_btm">
            <table border="0" style="width:210px; height:62px; float:left; margin-left:75px; margin-top:30px;" cellspacing="0" cellpadding="0">
              <tr>
                <td width="72"><img src="${path}/jbs/images/b1.png" width="62" height="62" /></td>
                <td><h2>正品保障</h2>正品行货  放心购买</td>
              </tr>
            </table>
			<table border="0" style="width:210px; height:62px; float:left; margin-left:75px; margin-top:30px;" cellspacing="0" cellpadding="0">
              <tr>
                <td width="72"><img src="${path}/jbs/images/b2.png" width="62" height="62" /></td>
                <td><h2>满38包邮</h2>满38包邮 免运费</td>
              </tr>
            </table>
            <table border="0" style="width:210px; height:62px; float:left; margin-left:75px; margin-top:30px;" cellspacing="0" cellpadding="0">
              <tr>
                <td width="72"><img src="${path}/jbs/images/b3.png" width="62" height="62" /></td>
                <td><h2>天天低价</h2>天天低价 畅选无忧</td>
              </tr>
            </table>
            <table border="0" style="width:210px; height:62px; float:left; margin-left:75px; margin-top:30px;" cellspacing="0" cellpadding="0">
              <tr>
                <td width="72"><img src="${path}/jbs/images/b4.png" width="62" height="62" /></td>
                <td><h2>准时送达</h2>收货时间由你做主</td>
              </tr>
            </table>
        </div>
    </div>
    <div class="btmbg">
        <div class="btm">
            <a href="https://beian.miit.gov.cn">备案/许可证编号：鄂ICP备20008779号-1</a> <br />本站仅供个人学习实践，无实际购买功能
        </div>
    </div>
    <!--End Footer End -->
</div>

</body>


</html>
